package com.lrj.common;

import lombok.Data;

@Data
public class Result {

  private Integer code;

  private String msg;

  private Object data;

  public static Result ok(Object data) {
    Result result = new Result();
    result.setCode(200);
    result.setMsg("操作成功");
    result.setData(data);
    return result;
  }

  public static Result fail(String msg) {
    Result result = new Result();
    result.setCode(500);
    result.setMsg(msg);
    return result;
  }
}
